<!DOCTYPE html>
<html>

<head>
    <title>执行案管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="UTF-8">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/bootstrap-responsive.min.css">
    <link rel="stylesheet" href="./css/colorpicker.css">
    <link rel="stylesheet" href="./css/datepicker.css">
    <link rel="stylesheet" href="./css/uniform.css">
    <link rel="stylesheet" href="./css/select2.css">
    <link rel="stylesheet" href="./css/main2.css">
    <link rel="stylesheet" href="./css/grey.css">
    <link rel="stylesheet" href="css/scheme.css">
</head>

<body>
    <div class="container-fluid" id="schemeManage">
        <div class="row-fluid">
            <div class="span12">
                <div class="input-append">
                    <input class="input-xxlarge scheme-input" type="text" placeholder="请输入执行案号进行查询">
                    <button class="btn btn-primary scheme-search" type="button"><i class="icon-search icon-white"></i> 查询</button>
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span3">
                <div class="widget-box">
                    <div class="widget-title">
                        <span class="icon">
                            <i class="icon-inbox"></i>
                        </span>
                        <h5>方案树</h5>
                    </div>
                    <div class="widget-content">
                        <dl class="scheme-tree">
                            <!-- <dt>无信息!</dt> -->
                        </dl>
                    </div>
                </div>
            </div>
            <div class="span9">
                <div class="widget-box">
                    <div class="widget-title">
                        <span class="icon">
                            <i class="icon-file"></i>
                        </span>
                        <h5>执行案上报信息</h5>
                    </div>
                    <div class="widget-content">
                        <table class="table text-center table-bordered table-striped table-hover scheme-summary">
                        </table>
                    </div>
                </div>
                <div class="widget-box">
                    <div class="widget-title">
                        <span class="icon">
                            <i class="icon-camera"></i>
                        </span>
                        <h5>照片信息</h5>
                    </div>
                    <div class="widget-content">
                        <table class="table text-center table-bordered table-striped table-hover  scheme-money">
                            <!-- <thead>
                                <tr>
                                    <th>Column name</th>
                                    <th>Column name</th>
                                    <th>Column name</th>
                                    <th>Column name</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>中文</td>
                                    <td>中国</td>
                                    <td>瓷器</td>
                                    <td>景德镇</td>
                                </tr>
                            </tbody> -->
                        </table>
                        <div class="row-fluid scheme-body hide">
                            <div class="span12 cs-posr">
                                <ul class="nav nav-tabs scheme-tab">
                                    <li class="active">
                                        <a href="#">金额照片</a>
                                    </li>
                                    <li><a href="#">定位照片</a>
                                    </li>
                                    <li><a href="#">非定位照片</a>
                                    </li>
                                    <li><a href="#">非定位照片附件</a>
                                    </li>
                                </ul>
                                <div class="cs-btns">
                                    <button type="button" data-toggle="modal" data-target="#uploadSchemePic" class="btn btn-small btn-info scheme-upload hide">上传附件</button>

                                    <div class="btn-group scheme-pic-btn">    
                                        <button type="button" class="btn btn-small btn-primary pic-bind-ok">已绑定照片</button>
                                        <button type="button" class="btn btn-small btn-primary">未绑定照片</button>
                                    </div>
                                    <button type="button" class="btn btn-danger btn-small remove-picture">删除</button>
                                    <button type="button" class="btn btn-success hide btn-small bind-picture">绑定</button>
                                  </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span12 nopadding">
                                  <label class="checkbox nopadding"><input type="checkbox" class="scheme-checked">全选</label>
                                </div>
                            </div>
                        </div>
                        <div class="row-fluid">
                            <div class="span12">
                                <ul class="thumbnails scheme-list">
                                   <!--  <li class="span4">
                                        <div class="thumbnail">
                                            <a href="#myModal" class="thumbnail" data-toggle="modal" data-keyboard="true">
                                                <img alt="" src="">
                                            </a>
                                            <p>金额：45.0000</p>
                                            <p>上传人：武志勇</p>
                                            <p>上传时间：2013/11/22 15:37:00</p>
                                            <p>备注：</p>
                                            <p>审核状态：未审核</p>
                                            <p>
                                                <div class="checker" >
                                                    <span>
                                                        <input>
                                                    </span>
                                                </div>
                                                <label >选中</label>
                                                <input type="hidden" value="244499">
                                            </p>
                                        </div>
                                    </li> -->
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span12">

            </div>
        </div>
    </div>
    <!-- modal  -->
    <div class="loading" id="dataLoading"></div>
    <div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-body">
        <div class="pic">
          <img  alt="图片预览">
          <a class="icon-share-alt turn-left" data-action="turnLeft"></a>
          <a class="icon-share-alt turn-right" data-action="turnRight"></a>
          <a class="icon-chevron-left prev" data-action="prev"></a>
          <a class="icon-chevron-right next" data-action="next"></a>
          <a class="icon-remove" data-dismiss="modal" data-action="close"></a>
        </div>
      </div>
    </div>

    <div class="modal hide fade" id="uploadSchemePic" tabindex="-2" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h3>上传附件</h3>
        </div>
      <div class="modal-body">
        <form id="uploadSchemeForm">
          <p class="clearfix">
            <span class="up-f-btn">上传附件：</span>
            <input type="file" class="input-large" name="file">
          </p>
          <p class="clearfix">
            <span class="up-f-btn">备注：</span>
            <textarea class="uploadPicNote" name="remark"></textarea>
          </p>
        </form>  
      </div>
      <div class="modal-footer">
          <a href="#" class="btn" data-dismiss="modal" aria-hidden="true">关闭</a>
          <a href="#" class="btn btn-primary" id="confrim-upload">确定</a>
        </div>
    </div>
    <!-- schemeTreeTmpl -->
    <script type="text/template" id="schemeTreeTmpl">
      <dt><i class="icon-chevron-down"></i> {{id}}</dt>
      {%_.each(SchemeDetailIDList,function(item){%}
        <dd>{{item}}</dd>
      {%});%}
    </script>
    <style>
      #myModal .modal-body .pic{
        text-align: center;
        margin: 0 auto;
      }
      #table-tmp{
        margin:20px;
        border-bottom: none;
      }
      #table-tmp .table{
        border: 1px solid #ddd;
        border-width: 1px 1px 1px 0;
      }
    </style>
    <!-- schemeListTmpl -->
    <script type="text/template" id="schemeListTmpl">
        {%_.each(Pictures,function(item, index){%}
            {% var csName = (initIndex+index)%3==0 ? ' nomarginLeft' : ''%}
            <li class="span4{{csName}}">
                <div class="thumbnail" data-id="{{item.PictureID}}">
                    {% if (item.PictureType != 3){%}
                      <a href="#myModal" data-id="{{item.PictureID}}" data-toggle="modal" data-keyboard="true">
                          <img alt=""  src="{{item.PictureURL}}" onerror="this.src='img/loading.png'">
                      </a>
                    {%}%}
                    <div class="caption">
                        {% if (item.PictureType == 1){%}
                            <p><span class="item-price">金额：&yen; <strong>{{item.PicturePrice}}</strong></span> </p>
                        {%}%}

                        {% if (item.PictureType == 3){%}
                          <p><span>文件名：</span>
                          <span onclick="window.open('{{item.FilePath}}')" class="btn-link btn-small" target="_blank" >{{item.FileName}}</span></p>
                          <p><span>附件类型：</span>{{item.FileTypeString}}</p>
                        {%}%}
                        <p><span>上传人：</span>{{item.Owner}}</p>
                        <p><span>备注：</span>{{item.Remark}}</p>

                        {% if (item.PictureType == 0){%}
                          <p title="{{item['Location']}}"><span>所在位置：</span>{{item['Location']}}</p>
                        {%}%}
                        <p><span>审核状态：</span>{{item.ApproveStatus}}</p>
                        <p><span>上传时间：</span>{{item.UploadDate}}</p>
                        <p>
                          <span class="span2">
                            <input type="checkbox" value="{{item.PictureID}}" data-status="{{item.ApproveStatus}}">
                          </span>
                        {% if (item.PictureType != 0 && item.PictureType != 3){%}
                            <span class="btn btn-warning btn-small to-location-pic" data-id="{{item.PictureID}}" data-pic-type="{{item.PictureType}}">切换到定位照片</span>
                        {%}%}

                        {% if (item.PictureType == 0){%}
                            <span class="btn btn-warning btn-small to-unlocation-pic" data-id="{{item.PictureID}}" data-pic-type="{{item.PictureType}}">切换到非定位照片</span>
                        {%}%}
                        </p>
                    </div>
                </div>
            </li>
        {%});%}
    </script>

   <!-- schemeMoneyTmpl -->
   <script type="text/template" id="schemeMoneyTmpl">
       <thead>
           <tr>
               <th>方案号</th>
               <th>照片总数</th>
               <th>金额照片</th>
               <th>定位照片</th>
               <th>非定位照片</th>
               <th>已审核金额</th>
               <th>未审核金额</th>
               <th>合计金额（元）</th>
           </tr>
       </thead>
       <tbody>
       <tr>
           <td>{{schemeId}}</td>
           <td>{{TotalPictureCount}}</td>
           <td>{{TotalMoenyPictureCount}}</td>
           <td>{{TotalLocationPictureCount}}</td>
           <td>{{TotalNoneLocationPictureCount}}</td>
           <td>{{ApprovePrice}}</td>
           <td>{{NotApprovePrice}}</td>
           <td>{{TotalPrice}}</td>
       </tr>
       </tbody>
   </script>

   <!-- schemeSummaryTmpl -->
    <script type="text/template" id="schemeSummaryTmpl">
       <thead>
           <tr>
           {%_.each(key, function(item){%}
               <th>{{item}}</th>
           {%});%}
           <th>操作</th>
           </tr>
       </thead>
       <tbody>    
           <tr>
           {%_.each(val, function(item){%}
               <td>{{item}}</td>
           {%});%}
           <td><button type="button" class="btn btn-small btn-danger scheme-rm">删除方案</button></td>
           </tr>
       </tbody>
    </script>
    <script src="./js/jquery-1.9.1.min.js"></script>
    <script src="./js/jquery.ui.custom.js"></script>
    <script src="./js/bootstrap.min.js"></script>
    <script src="./js/bootstrap-colorpicker.js"></script>
    <script src="./js/bootstrap-datepicker.js"></script>
    <script src="./js/jquery.uniform.js"></script>
    <script src="js/select2.min.js"></script>
    <script src="js/unicorn.js"></script>
    <script src="js/unicorn.form_common.js"></script>
    <script src="js/underscore-min.js"></script>
    <script src="js/schemeManagement.js"></script>
</body>

</html>